#ifndef NMC_ROOMEDITOR_HPP
#define NMC_ROOMEDITOR_HPP

#include "guichan.hpp"
#include "tilemap.hpp"
#include "editor/command.hpp"
#include "editor/gui/imageradiobutton.hpp"
#include "editor/gui/roomnavigation.hpp"
#include "editor/gui/roomview.hpp"
#include "editor/gui/tileselector.hpp"

#include <vector>

namespace nmc
{
    class RoomEditor: public gcn::Container, public gcn::ActionListener
    {
    public:
        RoomEditor();
        ~RoomEditor();
        void setRoomNumber(int roomNumber);
        void setSize(int width, int height);
        void action(const gcn::ActionEvent& actionEvent);
        void undo();
        void redo();
        void selectAll();
        void selectNone();

    protected:
        RoomView* mRoomView;
        TileSelector* mTileSelector;
        gcn::ScrollArea* mRoomViewScrollArea;
        RoomNavigation* mRoomNavigation;
        TileMap* mTileMap;

        ImageRadioButton* mPen;
        ImageRadioButton* mSelection;
        ImageRadioButton* mFloodFill;
        ImageRadioButton* mFilledRectangle;

        std::vector<Command*> mCommandUndoHistory;
        std::vector<Command*> mCommandRedoHistory;
    };
}
#endif